package com.hutao.sso.service.impl.user;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.hutao.sso.dataSource.TargetDataSource;
import com.hutao.sso.mapper.user.UsersMapper;
import com.hutao.sso.pojo.user.Users;
import com.hutao.sso.service.user.UsersService;

@Transactional
@Service
public class UsersServiceImpl implements UsersService{
	@Autowired
	private UsersMapper usersMapper;

	@TargetDataSource(name = "ds1")
	@Transactional(readOnly = true)
	@Override
	public Map<String, Object> findUserHospitalByLoginNameAndPassword(Map<String, Object> params) {
		return usersMapper.findUserHospitalByLoginNameAndPassword(params);
	}

	@TargetDataSource(name = "ds1")
	@Transactional(readOnly = true)
	@Override
	public Map<String, Object> findUserHospitalByLoginName(Map<String, Object> params) {
		return usersMapper.findUserHospitalByLoginName(params);
	}
	
	@TargetDataSource(name = "ds1")
	@Transactional(readOnly = true)
	@Override
	public Users findUserByLoginNameAndPassword(Map<String, Object> params) {
		return usersMapper.findUserByLoginNameAndPassword(params);
	}

	@TargetDataSource(name = "ds1")
	@Transactional(readOnly = true)
	@Override
	public List<Users> findUserListPage(Map<String, Object> params) {
		return usersMapper.findUserListPage(params);
	}

	@TargetDataSource(name = "ds1")
	@Transactional(readOnly = true)
	@Override
	public long findUserCount(Map<String, Object> params) {
		return usersMapper.findUserCountPage(params);
	}

	@TargetDataSource(name = "ds1")
	@Transactional(readOnly = true)
	@Override
	public Map<String, Object> findUserHospitalByCaClientCertificateId(Map<String, Object> params) {
		return usersMapper.findUserHospitalByCaClientCertificateId(params);
	}

	
	
	
	
	
	
	
	
	

	
	
}
